package com.sz.biz.common.customer.dto;

import com.sz.biz.logistics.base.dto.AddressModel;
import com.sz.common.base.constants.RegularConstants;
import com.sz.common.base.entity.Entity;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * Function: TODO: ADD FUNCTION <br>
 * Author: qiankun <br>
 * Date: 2017-05-12 09:59:10
 */
public class CusUserAddressDto extends AddressModel implements Entity {

    /**
     *
     */
    private static final long serialVersionUID = 1L;
    private Integer id;
    private Integer customerId;
    @NotBlank(message = "validate.notnull")
    private String name;
    private Integer type;
    @Size(max = 30, message = "validate.number.format.length.failed")
    @Pattern(regexp = RegularConstants.REG_PHONE_NULL, message = "validate.phone.format.failed")
    private String phone;
    @Size(max = 30, message = "validate.number.format.length.failed")
    @Pattern(regexp = RegularConstants.REG_PHONE_NULL, message = "validate.telphone.format.failed")
    private String telPhone;
    @Email(regexp = RegularConstants.REG_EMAIL_NULL, message = "validate.email.format.failed")
    private String email;
    private String description;
    private String fullAddress;
    private Boolean isDefault;
    /**
     * 标记当前地址是否可用 true：可用，false不可用
     **/
    private boolean isEnable;

    public static long getSerialversionuid() {
        return serialVersionUID;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Override
    public String getEmail() {
        return email;
    }

    @Override
    public void setEmail(String email) {
        this.email = email;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getFullAddress() {
        return fullAddress;
    }

    public void setFullAddress(String fullAddress) {
        this.fullAddress = fullAddress;
    }

    public Boolean getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(Boolean isDefault) {
        this.isDefault = isDefault;
    }

    public String getTelPhone() {
        return telPhone;
    }

    public void setTelPhone(String telPhone) {
        this.telPhone = telPhone;
    }
    /**
     * 标记当前地址是否可用 true：可用，false不可用
     **/
    public boolean isEnable() {
        return isEnable;
    }
    /**
     * 标记当前地址是否可用 true：可用，false不可用
     **/
    public void setEnable(boolean enable) {
        isEnable = enable;
    }
}
